{% extends "public/base.html" %}

{% block sidebar %}
    {% include "public/sidebar_resource.html" %}
{% endblock %}


{% block content %}

<div class="main">

    <!-- row -->
    <div class="row">

        <!-- col 12 -->
        <div class="col-md-12">
            <!-- tile -->
            <section class="tile transparent">

                <!-- tile header -->
                <div class="tile-header transparent">
                    <h1><strong>添加业务线/产品线</strong>  </h1>
                    <div class="controls">
                      <a href="#" class="refresh"><i class="fa fa-refresh"></i></a>
                      <a href="#" class="remove"><i class="fa fa-times"></i></a>
                    </div>
                </div>
                <!-- /tile header -->

                <!-- tile body -->
                <div class="tile-body color transparent-black rounded-corners">
                    <form class="form-horizontal" role="form" parsley-validate id="basicvalidations" method="post">

                        <div class="form-group">
                            <label for="service_name" class="col-sm-2 control-label">业务线名称</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="service_name"  id="service_name" autocomplete="off"  parsley-trigger="change" parsley-required="true" parsley-minlength="2" parsley-validation-minlength="1">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="pid" class="col-sm-2 control-label">上级产品线 *</label>
                            <div class="col-sm-8" id="select_pid">
                                <select name='pid' class="chosen-select chosen-transparent form-control" id="pid" parsley-trigger="change" parsley-required="true" parsley-error-container="#select_pid">
                                    <option value="0">顶级业务线</option>
                                    {% for product in products %}
                                    <option value="{{ product.id }}">{{ product.service_name }}</option>
                                    {% endfor %}
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="module_letter" class="col-sm-2 control-label">模块字母缩写: </label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="module_letter"  id="module_letter" autocomplete="off"  parsley-trigger="change" parsley-required="true" parsley-minlength="2" parsley-validation-minlength="1">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="dev_interface" class="col-sm-2 control-label">开发接口人: </label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="dev_interface"  id="dev_interface" autocomplete="off"  parsley-trigger="change" parsley-required="true" parsley-minlength="4" parsley-validation-minlength="1">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="op_interface" class="col-sm-2 control-label">运维接口人: </label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" name="op_interface"  id="op_interface" autocomplete="off"  parsley-trigger="change" parsley-required="true" parsley-minlength="4" parsley-validation-minlength="1">
                            </div>
                        </div>


                        <div class="form-group form-footer">
                            <div class="col-sm-offset-4 col-sm-8">
                                <button type="submit" class="btn btn-primary">提交</button>
                                <button type="reset" class="btn btn-default">重置</button>
                            </div>
                        </div>

                    </form>
                </div>
                <!-- /tile body -->



            </section>
            <!-- /tile -->
        </div>
        <!-- /col 12 -->

    </div>
    <!-- /row -->

</div>

{% endblock %}

{% block js %}
    <script>
        $(function(){

        //chosen select input
        $(".chosen-select").chosen({disable_search_threshold: 10});

    })
    </script>
{% endblock %}

